<?php $this->display("objects/breadcrumbs") ?>

<p class="commentsindicator">
<a href="<?php echo Gene::makeLink($object) ?>#comments">
<img src="<?php echo $ui['images'] ?>comments.gif" alt="Comments" />
<span class="commentnumber"><?php _e($object['numchilds']) ?> <?php echo (($object['numchilds'] == 1) ? 'comment' : 'comments') ?></span></a></p>
<h2><?php _e($object['title']) ?></h2>
<p class="entrydetails"><strong><?php echo makeDate($object['t_create'], 'F jS, Y') ?></strong> <?php echo makeDate($object['t_create'], 'H:i') ?> <acronym title="Greenwich Mean Time">GMT</acronym>
<?php if (count($entrycategories)): ?>
 in 
	<?php foreach ($entrycategories as $i): ?>
		<a href="<?php echo Gene::makeLink($parent) ?>/view/tag/<?php echo str_replace(" ", "_", $i) ?>"><?php _e($i) ?></a>
	<?php endforeach; ?>
<?php endif; ?>
</p>

<?php if ($multipart): ?>
	<div class="blogentry">
	<div id="blurb"><?php echo $blurb ?></div>
	<div id="more"><?php echo $sections[$showsection] ?></div>
	</div>
	
	<?php echo getPager(array(
		"object" => $object,
		"numpages" => count($sections),
		"currentpage" => $showsection,
		"section" => true
	)) ?>
<?php else: ?>
	<div class="blogentry">
	<?php echo $object['content'] ?>
	</div>
<?php endif; ?>

<?php if (count($similar)): ?>
<h3 id="seealso">See Also</h3>
<ul>
	<?php foreach ($similar as $i): ?>
		<li><a href="<?php echo Gene::makeLink($i) ?>"><?php _e($i['title']) ?></a> (<?php echo makeDate($i['t_create'], 'F jS, Y') ?>)</li>
	<?php endforeach; ?>
</ul>
<?php endif; ?>

<h3 id="comments">Your Comments</h3>
<?php if (count($childs)): ?>
	<?php foreach ($childs as $i): ?>
		<?php if (checkPermission($i, "view")): ?>
			<?php $this->display("objects/blogcomment/embed", array('object' => $i, 'parent' => $object)); ?>
		<?php endif; ?>
	<?php endforeach; ?>
<?php else: ?>
	<p>There are currently no comments for this blog entry. Why not add the first?</p>
<?php endif; ?>

<?php if (checkPermission($object, "write")): ?>
	<?php $this->display("objects/blogcomment/create"); ?>
<?php else: ?>
	<fieldset>
	<legend>Add Comment</legend>
	<p>Please <a href="<?php addArguments(Gene::makeLink(Gene::specialId('Login')), array('r' => $objectid)) ?>">sign in</a> to leave a comment.</p>
	</fieldset>
<?php endif; ?>